#!/bin/sh

function usage()
{
    echo "makesdk.sh usage:"
    echo "makesdk.sh copy <devType>"
    echo "makesdk.sh all <devType>"
    echo "makesdk.sh part <devType>"
}

function build_copy()
{
    ./copy_release.sh ./release ${1} 0
}

function build_all()
{
    echo "build all files"
    cd build/linux
    ./build_project.sh ${1} 0
}

function build_part()
{
    echo "build some files"
    cd build/linux
    ./shallily.sh ${1} 0
}

function main()
{
    if [ $# -lt 2 ]
    then
        echo "miss argument"
        usage
        exit
    fi
    echo $1
    echo $2
    if [ "$1" == "copy" ]
    then
        build_copy ${2}
    elif [ "$1" == "all" ]
    then
        build_all ${2}
    elif [ "$1" == "part" ]
    then
        build_part ${2}
    fi



}
main $@
